//  This file is part of Swordbible - http://www.swordwarrior.net
//  Copyright (C) 2003-2008 Manu Mital mitalmanu@hotmail.com

//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 2, or (at your option)
//  any later version.

//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.

//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software Foundation,
//  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#pragma once


#include "MyToolBar.h"
#include "SwordBibleFonts.h"
#include "AutoRichEditCtrl.h"
#include "afxwin.h"
#include "ColorMgr.h"
#include "afxcmn.h"
#include "RangeSet.h"


// CBottomPage dialog

class CBottomPage : public CPropertyPage
{
	DECLARE_DYNAMIC(CBottomPage)

public:
	int oldChapCount;
	int oldVerseCount;
	CBottomPage();
	static int staticPageCount;
	CString version;
	sword::SWModule* pModule;
	CRangeSet tips;
	static CString ActiveMainFrameCommand;
	

	virtual ~CBottomPage();

// Dialog Data
	enum { IDD = IDD_BOTTOMPAGE };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	CMyToolBar m_wndFormatBar;
	
	DECLARE_MESSAGE_MAP()
		

public:
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnBottomCopy();
	afx_msg void OnBottomSelectAll();
	afx_msg void OnBottomDisplay();
	afx_msg void OnBottomSearch();
	afx_msg void OnBottomSynch();
	afx_msg void OnUpdateBottomSynch(CCmdUI* pCmdUI);
	afx_msg void OnPrint();
	afx_msg void OnPrintPreview();
	afx_msg void OnNextChapter();
	afx_msg void OnPreviousChapter();

	afx_msg void OnZoom();
	afx_msg void OnUpdateZoom(CCmdUI *pCmdUI);	

	virtual BOOL OnInitDialog();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	virtual BOOL OnSetActive();
	void ShowChapter(void);
	void BibleSynch();
	void CreateTips();
	void ZoomText();
	void OnRightButtonDown();
	BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR,   LRESULT *pResult);

	afx_msg LONG OnMainFrameCommand(UINT,LONG);


	static CSwordBibleFonts font;
	CComboBox m_cmbBibleBook;
	afx_msg void OnSelectBibleBook();

	
	CComboBox m_cmbBottomChapter;
	CComboBox m_cmbBottomVerse;
	afx_msg void OnSelectBibleChapter();
	afx_msg void OnSelectBibleVerse();
	CAutoRichEditCtrl m_brichCtrl;
	afx_msg void OnEnMsgfilter(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnDestroy();

};
